package thread.java20230106;

public class Demo38 {
    public static void main(String[] args) throws InterruptedException {
        MyBlockQueue queue = new MyBlockQueue(4);
        queue.put(1);
        queue.put(2);
        queue.put(3);
        queue.put(4);
        System.out.println("取出数据: " + queue.take());
        System.out.println("取出数据: " + queue.take());
        System.out.println("取出数据: " + queue.take());
        queue.put(5);
        queue.put(6);
        System.out.println("取出数据: " + queue.take());
        System.out.println("取出数据: " + queue.take());
    }
}
